package org.ilovecode.display 
{
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.events.MouseEvent;
	
	import org.ilovecode.screen.ScreenGroup;
	
	/**
	 * ...
	 * @author ...
	 */
	public class AboutProjectApartmentsContent extends TextContentWindow 
	{
		
		public var situacija:MovieClip;
		public var zoomButton:SimpleButton;
		public var zoomWindow:ZoomWindow;
		private var inZoomView:Boolean = false;
		private var duration:Number = 0.3;
		
		public function AboutProjectApartmentsContent(name:String="") 
		{
			super(name);
			zoomButton.addEventListener(MouseEvent.CLICK, zoomButtonClick);
		}
		
		override protected function addListeners():void
		{
			super.addListeners();
			zoomButton.addEventListener(MouseEvent.CLICK, zoomButtonClick);
		}
		
		override protected function removeListeners():void
		{
			super.removeListeners();
			zoomButton.removeEventListener(MouseEvent.CLICK, zoomButtonClick);
		}
		
		override protected function initText():void
		{
			super.initText();
			
			var xml:XML = controller.getScreenXML("aboutProject", ScreenGroup.APARTMENTS);
			_contentTextField.htmlText = String(xml.info).replace(/\n|\r|\t/g,"");
		}
		
		private function zoomButtonClick(event:MouseEvent):void {
			/*if (!inZoomView) {
				var s:Situacija = new Situacija();
				
				zoomWindow.init(s, 400, 432);
				zoomWindow.focusRect = false;
				this.stage.focus = zoomWindow;
			} else {
				zoomWindow.clear();
			}
			inZoomView = !inZoomView;*/
			this.dispatchEvent(event);
		}
		
	}

}